Applet Callbacks Structure
When you instantiate an applet using theJMNewAppletViewer
function, you must pass a data structure that supplies callback information for the applet. This data structure is defined by theJMAppletViewerCallbacks
data type.
struct JMAppletViewerCallbacks { UInt32 fVersion; JMShowDocumentProcPtr fShowDocument; JMSetStatusMsgProcPtr fSetStatusMsg; };
Field Description
fVersion
- The version of JManager. You should set this field to
kJMVersion
.fShowDocument
- A pointer to a function that displays the contents of a URL passed to it, possibly in a new window. This callback function has the following type definition:
typedef void (*JMShowDocumentProcPtr) ( JMAppletViewerRef viewer, const JMTextRef urlString, const JMTextRef windowName);
- For more information, see the description of the application-defined function
MyShowDocument
.fSetStatusMsg
- A pointer to a function that handles messages from the applet. The client application can display the message (in a status bar, for example) or ignore it. This callback function has the following type definition:
typedef void (*JMSetStatusMsgProcPtr) ( JMAppletViewerRef viewer, const JMTextRef statusMsg);
- For more information, see the description of the application-defined function
MySetStatusMsg
.